<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/views/include/nocachehead.jsp"%>
<title>查看相册 - <c:out value="${requestScope.album.albumName }" /></title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/pagination.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/comment.js"></script>
</head>
<body>
	<%@ include file="/views/include/statusbar.jsp"%>
	<div>
		<!-- main content start -->
		<div>
			<!-- title nav start -->
			<div style="clear: both; padding-top:40px;"></div>
			<div>相册  
				<a href="${pageContext.request.contextPath}/wo/${requestScope.ownerId}.html"><c:out value="${requestScope.ownerName}" /></a>
				<a href="${pageContext.request.contextPath}/album/list/${requestScope.ownerId}.html"><c:out value="${requestScope.ownerName}" />的相册</a>
				<span><c:out value="${requestScope.album.albumName }" /></span>
			</div>
			<!-- title nav end -->
			<div>
			</div>
			<!-- photo content start -->
			<div>
			总共<span>${requestScope.page.total }</span>张照片
			<skyline:page url="${pageContext.request.contextPath}/album/view/${requestScope.albumId}.html" page="${requestScope.page}" maxSize="5" />
			<!-- photo list start -->
			<div>
				<skyline:setSessionAttrToVar var="SESSION_USER" key="SESSION_USER"/>
				<c:if test="${pageScope.SESSION_USER.id==requestScope.album.ownerId && requestScope.album.activity ne 'UNDELETABLE'}">
					<a title="上传照片" href="${pageContext.request.contextPath}/album/bupload/${requestScope.album.id }.html">上传照片</a>
				</c:if>
				<c:if test="${fn:length(requestScope.photos)==0 and pageScope.SESSION_USER.id!=requestScope.album.ownerId}">
					这家伙太懒了，什么都没上传。
				</c:if>
				<c:forEach items="${requestScope.photos}" var="photo">
				<div>
					<div>
						<a href="${pageContext.request.contextPath}/album/photo/${photo.id }.html"><img src="${pageContext.request.contextPath}/image/${photo.smallFile}.${photo.ext}" /></a>
					</div>
					<div>
						<div><span title="<c:out value="${photo.description}" />"><skyline:summary length="18" value="${photo.description}" /></span></div>
					</div>
				</div>
				</c:forEach>
				
			</div>
			<!-- photo list end -->
			<skyline:page url="${pageContext.request.contextPath}/album/view/${requestScope.albumId}.html" page="${requestScope.page}" maxSize="5" />
			</div>
			<!-- photo content end -->
			<skyline:comment maxSize="10"  commentType="ALBUM" objId="comment"  contextPath="${pageContext.request.contextPath}" resourceId="${requestScope.album.id }" resourceName="${requestScope.album.albumName }"  ownerId="${requestScope.ownerId}"/>
		</div>
		<!-- main content end -->
	</div>
</body>
</html>